using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class changeColor : MonoBehaviour
{
    public bool state;
    Image i;

    private void Start()
    {
        state = false;
        i = GetComponent<Image>();
        i.color = Color.green;
    }
    public void ChangeColor()
    {
        state = !state;
        if (state)
        {
            i.color = Color.red;
        }
        else 
        {
            i.color = Color.green; 
        }
        //Debug.Log(Convert.ToString(10, 2));
    }
}
